import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home/Home.vue'//一级
import Atb from '../views/Children/Atb/Atb.vue'//求购
import Estate from '../views/Children/Estate/Estate.vue'//楼市圈
import Hand from '../views/Children/Hand/Hand.vue'//二手房
import House from '../views/Children/House/House.vue'//主页
import Live from '../views/Children/Live/Live.vue'//直播
import Msg from '../views/Children/Msg/Msg.vue'//消息
import New from '../views/Children/New/New.vue'//新房
import Rank from '../views/Children/Rank/Rank.vue'//排行榜
import Rent from '../views/Children/Rent/Rent.vue'//出租房
import Seek from '../views/Children/Seek/Seek.vue'//求租
import Group from '../views/Children/Group/Group.vue'//团购
import GroupDetail from '../views/Children/GroupDetail/GroupDetail.vue'//团购详情
import StartGroup from '../views/Children/StartGroup/StartGroup.vue'//开团
import SetGroup from '../views/Children/SetGroup/SetGroup.vue'//创建开团

import Recored from '../views/Children/Recored/Recored.vue'//战绩
import Renting from '../views/Children/Renting/Renting.vue'//租房成交战绩

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/home/house',
    children: [
      {
        path: '/home/atb',
        name: 'Atb',
        component: Atb,
      },
      {
        path: '/home/estate',
        name: 'Estate',
        component: Estate,
      },
      {
        path: '/home/group',
        name: 'Group',
        component: Group,
      },
      {
        path: '/home/groupdetail',
        name: 'GroupDetail',
        component: GroupDetail,
      },
      {
        path: '/home/startgroup',
        name: 'StartGroup',
        component: StartGroup,
      },
      {
        path: '/home/setgroup',
        name: 'SetGroup',
        component: SetGroup,
      },
      {
        path: '/home/hand',
        name: 'Hand',
        component: Hand,
      },
      {
        path: '/home/house',
        name: 'House',
        component: House,
      },
      {
        path: '/home/live',
        name: 'Live',
        component: Live,
      },
      {
        path: '/home/msg',
        name: 'Msg',
        component: Msg,
      },
      {
        path: '/home/new',
        name: 'New',
        component: New,
      },
      {
        path: '/home/rank',
        name: 'Rank',
        component: Rank,
      },
      {
        path: '/home/recored',
        name: 'Recored',
        component: Recored,
      },
      {
        path: '/home/renting',
        name: 'Renting',
        component: Renting,
      },
      {
        path: '/home/rent',
        name: 'Rent',
        component: Rent,
      },
      {
        path: '/home/seek',
        name: 'Seek',
        component: Seek,
      },
    ]
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
